package com.bussiness.system.form;

import com.bussiness.system.base.BaseForm;
import com.bussiness.system.dto.UserEntityDto;
import com.bussiness.system.entity.UserEntity;
import com.bussiness.system.util.TransferUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
* 系统用户
*
* @author xianliru
* @email 402701653@qq.com
* @date 2018-08-14 00:21:25
*/
public class UserEntityAuditForm extends BaseForm<UserEntity> {


    List<UserEntity> userEntities = new ArrayList <>(  );

    /**
     *
     */
    private Long userId;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 盐
     */
    private String salt;
    /**
     * 邮箱
     */
    private String email;
    /**
     * 手机号
     */
    private String mobile;
    /**
     * 状态  0：禁用   1：正常
     */
    private Integer status;
    /**
     * 部门ID
     */
    private Long deptId;


    public List <UserEntity> getUserEntities() {
        return userEntities;
    }

    public void setUserEntities(List <UserEntity> userEntities) {
        this.userEntities = userEntities;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    @Override
    public String toString() {
        return super.toString();
    }

    @Override
    public UserEntityDto transfer() {
        return TransferUtil.transfer(this, UserEntityDto.class);
    }


    public static void main(String[] args) {
        UserEntityAuditForm u = new UserEntityAuditForm();
        u.transfer();
        u.setDeptId( Long.valueOf( 1111 ) );
        u.setEmail( "ssss" );
        UserEntity userEntity = new UserEntity();
        userEntity.setMobile( "12345678" );
        u.getUserEntities().add( userEntity );
//        Map<String,Object> map = u.beanToMap( );
//        System.out.println(map);
    }
}
